# _*_coding:utf-8 _*_
# @Time   :2020/6/29
import json
import requests
import core.myconfig

# headers = {
#     "Content-Type": "application/json;charset=UTF-8",
#     "Authorization": "token {}".format(myconfig.config['token'])
# }
# data = {
#     'users': ['fanzhe', 'WEIL', 'qingkong']
# }
# res = requests.post('http://127.0.0.1/finishusers', json=data, headers=headers)
# print(res)

user = {
    'users': ['fanzhe']
}

data = {
    'time': '11:30'
}
headers = {
    "Content-Type": "application/json;charset=UTF-8",
    "Authorization": "token {}".format(core.myconfig.config['token'])
}
res = requests.post('https://127.0.0.1:80/finduserbytime', json=data, headers=headers)
res1 = requests.post('https://127.0.0.1:80/finishusers', json=user, headers=headers)
print(json.loads(res.text))
print(len(json.loads(res.text)['data']))
print(res1.text)
